#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# @Time    : 2022/9/28 9:26
# @Author  : Junzhao
# @File    : login.py
# @Software: PyCharm
class User:
    login_attempts = 1

    def increment_login_attempts(self):
        self.login_attempts += 1

    def reset_login_attempts(self):
        self.login_attempts = 0


xiaoguo = User()
xiaoguo.increment_login_attempts()
print(xiaoguo.login_attempts)
xiaoguo.increment_login_attempts()
xiaoguo.reset_login_attempts()
print(xiaoguo.login_attempts)

